package com.haixinga.commbiz.commons.utils;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * 仅放置通用的配置参数
 **/

@Component
public class PropKit {

    /** 加载配置参数 **/
    @Value("${isys.user.allow-multi-user}")
    private boolean allowMultiUser;


    /** 存放静态对象 **/
    private static PropKit staticBean = null;
    private static synchronized PropKit getStaticBean(){
        if(staticBean == null){
            staticBean = SpringBeansUtil.getBean(PropKit.class);
        }
        return staticBean;
    }

    /** 对外提供static的get函数 */

    public static boolean isAllowMultiUser() {
        return getStaticBean().allowMultiUser;
    }
}
